package com.evl.constant;

/**
 * 用户的状态
 *
 * @author fengshuonan
 * @Date 2017年1月22日 下午12:14:59
 */
public enum PayType {

	buy(1, "购票"),
	refund(2, "退票"); 

    int code;
    String name;

    PayType(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String valueOf(Integer status) {
        if (status == null) {
            return "";
        } else {
            for (PayType s : PayType.values()) {
                if (s.getCode() == status) {
                    return s.getName();
                }
            }
            return "";
        }
    }

}
